﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Controls;
using System.Data;
using System.Windows;

namespace DBSearch
{
    public class DataTypeTemplateSelector : DataTemplateSelector
    {
        public override System.Windows.DataTemplate SelectTemplate(object item, System.Windows.DependencyObject container)
        {
            Window window = Application.Current.MainWindow;
            if (item is DataRowView)
                return window.FindResource("DataTypes") as DataTemplate;

            return base.SelectTemplate(item, container);

        }
    }
}
